<template>
  <view class="comment-box">
    <view class="title">
      <uni-icons :type="icon" :color="iconColor" size="24" />
      <view class="title-text">
        {{ title }}
      </view>
    </view>
    <view class="comment-list">
      <view class="comment-item" v-for="item in commentList" :key="item.id">
        <view class="userTx">
          <image :src="item.userTx" mode="aspectFill"></image>
        </view>
        <view class="content">
          <view class="userName">{{ item.userName }}</view>
          <view class="comment-content">
            {{ item.content }}
          </view>
          <view class="likeNum">
            <uni-icons type="hand-up" size="24" />
            {{ item.likeNum }}
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  props: ["title", "icon", "iconColor", "commentList"],
};
</script>

<style></style>
